package test1225;

public class Test04 {
    public  static int[] m04(int[] arr,int[] brr){
        int[]crr = new int[arr.length+ brr.length];
        for(int i=0;i<arr.length;i++){
            crr[i] = arr[i];
        }
        for(int i=0;i<brr.length;i++){
            crr[arr.length+i] = brr[i];
        }
        return crr;
    }
    public static void main(String[] args) {
        // 合并2个数组中的元素
        int[] arr = {1, 2, 3};
        int[] brr = {4, 5, 6};
        int[] crr = m04(arr, brr);
        for (int c : crr) {
            System.out.println(c);
        }
    }

}


